load("@rules_cc//cc:defs.bzl", "cc_library")
load("//bazel:copts.bzl", "copts")

cc_library(
    name = "grpc",
    srcs = [
        "completion-thread-pool.cc",
        "server.cc",
    ],
    hdrs = [
        "call-type.h",
        "client.h",
        "completion-thread-pool.h",
        "logging.h",
        "server.h",
        "traits.h",
    ],
    copts = copts(),
    # TODO(benh): resolve build issues on Windows and then remove
    # these 'target_compatible_with' constraints.
    target_compatible_with = select({
        "@platforms//os:linux": [],
        "@platforms//os:macos": [],
        "//conditions:default": ["@platforms//:incompatible"],
    }),
    visibility = ["//visibility:public"],
    deps = [
        "//eventuals",
        "@com_github_3rdparty_stout//:borrowed-ptr",
        "@com_github_3rdparty_stout//:notification",
        "@com_github_google_glog//:glog",
        "@com_github_grpc_grpc//:grpc++",
        "@com_google_absl//absl/base",
        "@com_google_absl//absl/container:flat_hash_map",
    ],
)
